
package framework.controller;
import java.util.ArrayList;
import java.util.List;

public class TransactionManager {

    private static TransactionManager instance;
    private List<ITransaction> trans;
    //
    public static TransactionManager getInstance() {
        if (instance == null) {
            instance = new TransactionManager();
        }
        return instance;
    }

    private TransactionManager() {
        this.trans = new ArrayList<ITransaction>();
    }

    public void storeTransaction(ITransaction t) {
        trans.add(t);
        t.execute();
    }
}
